package object;

public class Person {
    public String name;
    public String sex;
    public int height;
    public double weight;

    static int n = 10;

     public Person(){//无参构造
    }
    public Person(String a,String b,int c,double d){//有参构造
        name = a;
        sex = b;
        height = c;
        weight = d;

    }
    public Person(String a, String b){
        name  = a;
        sex = b;
    }
     public void print(){
        System.out.println("姓名:"+ name+"," + "性别:"+sex+","+"身高:"+height+"," +"体重:"+weight);
    }


    public static void main(String[] args) {
        Person per1 = new Person();
        Person per2 = new Person("小黄","女",178,100.4);
        per1.name = "胡歌";
        per1.sex = "男";
        per1.height = 180;
        per1.weight =130.4;
        Person.n = 21;
        per1.print();
        per2.print();
    }
}
